<html>
<head><meta charset="utf-8"><title>Would adding a rust-toolchain file break -Z build-std · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html">Would adding a rust-toolchain file break -Z build-std</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216638109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216638109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216638109">(Nov 13 2020 at 16:44)</a>:</h4>
<p>... if the toolchain file is in rust-lang/rust? (sorry, didn't fit in the title)</p>
<p><a href="https://github.com/rust-lang/rust/pull/79021">https://github.com/rust-lang/rust/pull/79021</a></p>



<a name="216638214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216638214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216638214">(Nov 13 2020 at 16:44)</a>:</h4>
<p>basically I want to know if -Z build-std is looking at a copy of the whole repo or just <code>library/</code></p>



<a name="216638404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216638404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216638404">(Nov 13 2020 at 16:45)</a>:</h4>
<p>apparently not :)</p>
<div class="codehilite"><pre><span></span><code>$ cargo +stage1 build -Z build-std --target x86_64-unknown-linux-gnu
   Compiling compiler_builtins v0.1.36
   Compiling core v0.0.0 (/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.79
   Compiling cc v1.0.60
   Compiling std v0.0.0 (/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/src/rust/library/std)
   Compiling unwind v0.0.0 (/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/src/rust/library/unwind)
    Building [================&gt;                                         ] 9/30: ...
</code></pre></div>



<a name="216638513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216638513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216638513">(Nov 13 2020 at 16:46)</a>:</h4>
<p>oh hmm I'm not sure if that's coming from my copy of the rust-lang/rust checkout or not though</p>



<a name="216639506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216639506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216639506">(Nov 13 2020 at 16:53)</a>:</h4>
<p>You use <code>+stage1</code> which overrides <code>rust-toolchain</code>.</p>



<a name="216639574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216639574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216639574">(Nov 13 2020 at 16:53)</a>:</h4>
<p>well this is in a different folder, not in <code>rustc/</code></p>



<a name="216639683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216639683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216639683">(Nov 13 2020 at 16:54)</a>:</h4>
<p>I guess that means it should just work then, since rustup will ignore the rust-toolchain file if it's not in the current directory</p>



<a name="216640172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216640172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216640172">(Nov 13 2020 at 16:57)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> we wouldn't copy the  file into the various components, so no</p>



<a name="216640241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Would%20adding%20a%20rust-toolchain%20file%20break%20-Z%20build-std/near/216640241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Would.20adding.20a.20rust-toolchain.20file.20break.20-Z.20build-std.html#216640241">(Nov 13 2020 at 16:58)</a>:</h4>
<p>or at least I don't imagine we would, doesn't seem like the thing to do</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>